<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>智能体题库</h1>
<div id="content"></div>
<form id="f1">
  <textarea name="prompt" rows="5" cols="50"></textarea><br>
  <input type="button" value="提交">
</form>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
   $(function(){
      $(":button").on("click", function(){
         let params = $("#f1").serialize();
         $.ajax({
            url: '/ai/topic',
            type: 'get',
            data: params,
            success: function(result){
                $("#content").empty();
                $("#content").append(result);
            }
         });
      })
   })
</script>
</body>
</html>